# -*- mode: snippet -*-
# name : common
# --
##  ,----------
#  / Makefile
#  `-------------
OBJS = $(patsubst %.c, %.o, $(wildcard *.c))
BIN = ${1:a.out}
CFLAGS := -g -Wall
CPPFLAGS := $(CFLAGS)
CC = gcc
RM = rm -f

.PHONY : clean

$(BIN) : $(OBJS)
	$(CC) -o $@ $^ $(CFLAGS)

clean :
	$(RM) $(BIN) $(OBJS)

%.o : %.c
	$(CC) -c $(CFLAGS) $< -o $@
